Skip to content

fix(plausible): use consistent window reference in clientInit stub#574

Merged
harlan-zw merged 1 commit intomainfrom
fix/543
Jan 15, 2026
Merged

fix(plausible): use consistent window reference in clientInit stub#574
harlan-zw merged 1 commit intomainfrom
fix/543

Conversation

@harlan-zw
Copy link
Collaborator

@harlan-zw harlan-zw commented Jan 15, 2026

🔗 Linked issue

Resolves #543

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)

📚 Description

The clientInit stub for Plausible Analytics was using bare plausible identifier mixed with window.plausible, which can cause issues in ES module scope where identifier resolution differs from non-module scripts.

Fixes #543

The clientInit stub was using bare `plausible` identifier mixed with
`window.plausible`, which can cause issues in ES module scope. Updated
to use consistent `window` reference throughout, matching the pattern
used by Google Analytics.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link
Contributor

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
scripts-docs Ready Ready Preview, Comment Jan 15, 2026 2:51pm
scripts-playground Ready Ready Preview, Comment Jan 15, 2026 2:51pm

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 15, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/scripts/@nuxt/scripts@574

commit: 09b6688

@harlan-zw harlan-zw merged commit 4c79486 into main Jan 15, 2026
10 checks passed
@harlan-zw harlan-zw deleted the fix/543 branch January 15, 2026 14:58
@harlan-zw harlan-zw mentioned this pull request Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plausible's new script not working

1 participant